//如果用uni请求
import http from '@/common/uni.interface.js';
console.log(http)
//如果是用uview请求,就用下面这句
// const http = uni.$u.http


//获取用户信息
export function getUserInfo(params) {
	return http.get('user/getUserDetail', params)
}

//用户登录
// export function userLogin(params) {
// 	return http.post('user/loginWechat', params)
// }
export function userLogin(params) {
	return http.post('user/login', params)
}
//设备列表
export function facilityList(params) {
	return http.post('userfacilities/facilitylist', params)
}

//添加/编辑设备
export function facilityadd(params) {
	return http.post('userfacilities/facilityadd', params)
}
//添加/编辑设备
export function facilitydelete(params) {
	return http.post('userfacilities/facilitydelete', params)
}

//添加/编辑用户
export function useradd(params) {
	return http.post('user/useradd', params)
}
//用户列表
export function userlist(params) {
	return http.post('user/userlist', params)
}
//删除用户
export function userdelete(params) {
	return http.post('user/userdelete', params)
}
//添加/编辑车辆
export function vihicleadd(params) {
	return http.post('uservihicle/vihicleadd', params)
}
//车辆列表
export function vihiclelist(params) {
	return http.post('uservihicle/vihiclelist', params)
}
//车辆列表
export function vihicledelete(params) {
	return http.post('uservihicle/vihicledelete', params)
}
// 添加配置
export function defaultsetadd(params) {
	return http.post('userdefaultset/defaultsetadd', params)
}
// 配置列表
export function defaultsetList(params) {
	return http.post('userdefaultset/defaultsetlist', params)
}
// 配置列表
export function defaultsetdel(params) {
	return http.post('userdefaultset/defaultsetdelete', params)
}

// 查询设备详情
export function facilitydetail(params) {
	return http.post('userfacilities/facilitydetail', params)
}

// 查询设备详情
export function rolelist(params) {
	return http.post('user/rolelist', params)
}
// 查询设备详情
export function shoproleadd(params) {
	return http.post('user/shoproleadd', params)
}
export function roledelete(params) {
	return http.post('user/roledelete', params)
}
export function getTotalInfo(params) {
	return http.post('userfacilityaction/facilityactionlistcount', params)
}
export function facilityactionlist(params) {
	return http.post('userfacilityaction/facilityactionlist', params)
}

export function shoplinelist(params) {
	return http.post('userfacilityaction/shoplinelist', params)
}

export function shoplineadd(params) {
	return http.post('userfacilityaction/shoplineadd', params)
}
export function shoplinedelete(params) {
	return http.post('userfacilityaction/shoplinedelete', params)
}
export function driverAddOr(params) {
	return http.post('uservihicle/driverAddOr', params)
}
export function shoprolelistall(params) {
	return http.post('user/shoprolelistall', params)
}

export function loadingabout(params) {
	return http.post('user/loadingabout', params)
}

